package com.xuelang.pipeline.infrastructure.task.converter;

import com.xuelang.pipeline.domain.task.TaskInstance;
import com.xuelang.pipeline.infrastructure.task.dataobject.TaskInstanceDO;
import org.mapstruct.Mapper;
import org.mapstruct.factory.Mappers;

/**
 * <p>任务实例DO转换类</p>
 *
 * @author : yixin.lys
 * @date : 2024-06-19 14:11
 **/
@Mapper
public interface TaskInstanceToDOConverter {

    TaskInstanceToDOConverter INSTANCE = Mappers.getMapper(TaskInstanceToDOConverter.class);

    /**
     * 从DO转换
     * @param target
     * @return
     */
    TaskInstance fromDO(TaskInstanceDO target);

    /**
     * 转换为DO
     * @param target
     * @return
     */
    TaskInstanceDO toDO(TaskInstance target);

}
